1. Field of the Invention
The present invention relates generally to a control unit and method for controlling a motor for use in a printer, and a storage medium storing a control program.
2. Description of Related Art
Conventionally, paper-feed control for printers is performed by controlling a paper-feed motor (called a PF motor hereinafter). Control of a PF motor using a DC (Direct Current) motor as the PF motor is performed as follows. The PF motor is started by acceleration control. The motor is then driven at a constant speed by PID control, and decelerated to stop. PID control is performed based on a deviation of the number of output pulses of an encoder that rotates to follow the rotation of the PF motor from a target number of pulses (position).
PID control is, however, has following drawbacks: It is difficult to precisely stop a PF motor at a target position. An actual position at which a PF motor stops may fall in an allowable range, however, is distant from the target position. The PF motor sometimes rotates a little bit after stoppage due to disturbance, such as, vibration of a carriage in serial printer.
In the event of paper-feed processing by starting a PF motor again after stoppage, since a target position for the motor is set with reference to the target position that has been set at a previous motor start-up before stoppage, printing medium (sheet of paper) may stop at a position further distant form the target position. This results in printing at positions distant from desired positions.